package com.bycx.system.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bycx.core.constant.PubBusinessConstant;
import com.bycx.core.exception.BusinessException;
import com.bycx.core.service.BaseService;
import com.bycx.core.util.BeanUtil;
import com.bycx.core.util.Md5Utils;
import com.bycx.core.util.SessionUtil;
import com.bycx.core.util.StringUtils;
import com.bycx.system.dto.mapper.ASysGroupUserDtoMapper;
import com.bycx.system.dto.mapper.ASysUserDtoMapper;
import com.bycx.system.mapper.ASysRoleUserMapper;
import com.bycx.system.mapper.ASysUserMapper;
import com.bycx.system.mapper.ASysUserOrgMapper;
import com.bycx.system.model.ASysOrg;
import com.bycx.system.model.ASysRoleUser;
import com.bycx.system.model.ASysUser;
import com.bycx.system.model.ASysUserDetail;
import com.bycx.system.model.ASysUserOrg;
import com.bycx.system.service.IASysOrgService;
import com.bycx.system.service.IASysUserDetailService;
import com.bycx.system.service.IASysUserService;

@Service
public class ASysUserServiceImpl implements IASysUserService{
	@Autowired 
	private ASysUserMapper aSysUserMapper;
	@Autowired
	private ASysRoleUserMapper aSysRoleUserMapper;
	@Autowired
	private ASysUserOrgMapper aSysUserOrgMapper;
	@Autowired
	private IASysOrgService aSysOrgService;
	@Autowired
	private ASysUserDtoMapper aSysUserDtoMapper;
	@Autowired
	private ASysGroupUserDtoMapper aSysGroupUserDtoMapper;
	@Autowired private IASysUserDetailService sSysUserDetailService;
	
	@Override
	public ASysUser get(Map<String,Object> params){
		return aSysUserMapper.get(params);
	}
	@Override
	public List<ASysUser> getList(Map<String,Object> params){
		return aSysUserMapper.getList(params);
	}
	
	
	@Override
	public ASysUser getBygetByPrimaryKey(String userId) {
		return aSysUserMapper.getByPrimaryKey(userId);
	}
	
	@Override
	public ASysUser getByLoginname(String loginame) {
		try {
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("loginName", loginame);
			return this.get(map);
		} catch (Exception e) {
			e.printStackTrace();
			throw new BusinessException("查询用户异常");
		}
		
	}
	
	@Override
	public List<ASysUser> getUserList(Map<String,Object> params){
		return aSysUserMapper.getUserList(params);
	}
	@Override
	public void setBaseMapper() {
		// TODO Auto-generated method stub
		
	}
	@Override
	public ASysUser getByPrimaryKey(Serializable primaryKey) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public ASysUser get(String propName, String value) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public List<ASysUser> getList(String propName, String value) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void save(ASysUser t) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void updateByPrimaryKey(ASysUser t) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void deleteByPrimaryKey(Serializable primaryKey) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void deleteObj(List<ASysUser> list) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void delete(List<String> ids) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void save(ASysUser aSysUser, List<String> roleIds) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public List<ASysUser> getSubOrgUsers(String loginName,
			String subUserRoleCode) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void save(ASysUser aSysUser, ASysUserDetail aSysUserDetail) {
		// TODO Auto-generated method stub
		
	}
	@Override
	public void resetPassword(String userId) {
		// TODO Auto-generated method stub
		
	}
	
	
}

